-
Notifications
You must be signed in to change notification settings - Fork 258
Fix app.pulumi.com links opening in new tabs #16839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Treat subdomains of pulumi.com as internal links so they don't open in new tabs. The external-links.ts script now checks for subdomain relationships instead of exact domain match, allowing app.pulumi.com to be recognized as internal when linking from pulumi.com.
Documentation ReviewSummaryThis PR fixes the Issues Found1. Logic correctness concern -
|
|
Your site preview for commit 3cca078 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-16839-3cca078b.s3-website.us-west-2.amazonaws.com. |
The JavaScript fix in external-links.ts only affects links that don't already have a target attribute. These files had target="_blank" hardcoded on app.pulumi.com links, causing them to still open in new tabs. Removed the attribute so the JavaScript subdomain detection logic can properly treat them as internal links. Files updated: - theme/stencil/src/components/header-cta/header-cta.tsx - theme/stencil/src/components/pricing-cta/pricing-cta.tsx - layouts/shortcodes/templates/pulumi-new.html - layouts/shortcodes/console-note.html - layouts/partner/aws.html - layouts/partials/top-nav.html - layouts/partials/home/cli.html - layouts/partials/header.html - layouts/partials/docs-top-nav.html - layouts/page/reinvent.html - content/docs/reference/cloud-rest-api/api-basics/_index.md - content/docs/iac/concepts/state-and-backends.md - content/docs/deployments/get-started/_index.md
|
@asafashirov I think you need to run |
|
Your site preview for commit a5d327d is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-16839-a5d327dc.s3-website.us-west-2.amazonaws.com. |
|
@adamgordonbell I just tried that - it didn't work. |
|
You can see in the preview that it's still opening a new tab on homepage. I believe that is because the builded js hasn't been updated. |
|
@adamgordonbell that didn't seem to work on my end. My Claude Code thinks "the CI pipeline may need to clear its Hugo cache or ensure make build-assets runs after pulling the latest code. This is a CI caching issue, not a code issue." but I have not idea how to come about doing this. |
Treat subdomains of pulumi.com as internal links so they don't open in new tabs. The external-links.ts script now checks for subdomain relationships instead of exact domain match, allowing links to app.pulumi.com to be recognized as internal when linking from pulumi.com or vice versa.
This was an unintended side effect of PR #15080 which added the "open external links in new tabs" feature.